import request from '@/utils/request.js'

//获取详细地址
export const getAddressDetail = (id) => request(`/api/address/${id}`)

//添加地址
export const addAddress = (data) => request.post('/api/address', data)

//更新地址
export const updateAddress = (id, data) =>
  request.put(`/api/address/${id}`, data)

//删除地址
export const delAddress = (id) => request.delete(`/api/address/${id}`)
